package com.situ.stl.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@ToString
@NoArgsConstructor
public class Course {
    //id
    @TableId(type = IdType.AUTO)
    private Integer id;
    //姓名
    private String name;
    //时间
    @JsonFormat( pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;
    //时长
    private Integer length;
    //最大人数
    private Integer maxCount;
    //教室
    private String room;
    //图片
    private String photo;
    //教练ID
    private Integer coachId;
    //目前人数
    private Integer currentCount;

    @TableField(exist = false)
    private String coachName;

}
